# -*- encoding: utf-8 -*-
'''
Filename         :26_removeDuplicates.py
Description      :
Time             :2022/08/19 15:30:11
Author           :daiyizheng
Email            :387942239@qq.com
Version          :1.0
'''

from typing import List


class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        n = len(nums)
        for i in range(n-1,0,-1): 
            if nums[i] == nums[i-1]: 
                nums.pop(i)